<template>
    <table border="1" cellpadding="0" cellspacing="0">
      <tr>
          <th>标题</th>
          <th>内容</th>
          <th>作者</th>
      </tr>
      <tr v-for="i in ne" :key="i.id">
          <td>{{ i.tital }}</td>
          <td>{{ i.content }}</td>
          <td>{{ i.author }}</td>
      </tr>
  
    </table>
  </template>
  
  <script>
import axios from 'axios';

  
  export default {
      name:'day01',
      data() {
          return {
              ne: []
          }
      },
      mounted () {
          axios.get('http://127.0.0.1:8000/app/news/').then((result) => {
            console.log(result.data);
            this.ne=result.data
            
          }).catch((err) => {
            
          });
      },
  }
  </script>
  
  <style>
  
  </style> 